home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Online / Apache / include / php / Zend / zend_ptr_stack.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-07-02  |  2.0 KB  |  44 lines

  1. /*
  2.    +----------------------------------------------------------------------+
  3.    | Zend Engine                                                          |
  4.    +----------------------------------------------------------------------+
  5.    | Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
  6.    +----------------------------------------------------------------------+
  7.    | This source file is subject to version 0.92 of the Zend license,     |
  8.    | that is bundled with this package in the file LICENSE, and is        | 
  9.    | available at through the world-wide-web at                           |
  10.    | http://www.zend.com/license/0_92.txt.                                |
  11.    | If you did not receive a copy of the Zend license and are unable to  |
  12.    | obtain it through the world-wide-web, please send a note to          |
  13.    | license@zend.com so we can mail you a copy immediately.              |
  14.    +----------------------------------------------------------------------+
  15.    | Authors: Andi Gutmans <andi@zend.com>                                |
  16.    |          Zeev Suraski <zeev@zend.com>                                |
  17.    +----------------------------------------------------------------------+
  18. */
  19.  
  20.  
  21. #ifndef ZEND_PTR_STACK_H
  22. #define ZEND_PTR_STACK_H
  23.  
  24. typedef struct _zend_ptr_stack {
  25.     int top, max;
  26.     void **elements;
  27.     void **top_element;
  28. } zend_ptr_stack;
  29.  
  30.  
  31. #define PTR_STACK_BLOCK_SIZE 64
  32.  
  33. ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack);
  34. ZEND_API void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr);
  35. ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...);
  36. ZEND_API void *zend_ptr_stack_pop(zend_ptr_stack *stack);
  37. ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...);
  38. ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack);
  39. ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *));
  40. ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements);
  41. ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack);
  42.  
  43. #endif /* ZEND_PTR_STACK_H */
  44.